package com.itheima.controller;

import com.itheima.domain.vo.EachClassStudentCount;
import com.itheima.domain.vo.JobOption;
import com.itheima.domain.vo.Result;
import com.itheima.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:篍
 * @Date: 2025/07/14 16:31
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    ReportService reportService;

    @GetMapping("/empJobData")
    public Result reportEmpJobData(){
        return Result.success(reportService.getEmpJobData());
    }

    @GetMapping("/empGenderData")
    public Result reportGenderData(){
        return Result.success(reportService.getGenderData());
    }


    /**
     * 学员学历统计
     */
    @GetMapping("/studentDegreeData")
    public Result studentDegreeReport(){
        return Result.success(reportService.studentDegreeReport());
    }

    /**
     * 班级人数统计
     * @return
     */
    @GetMapping("/studentCountData")
    public Result studentCountReport(){
       EachClassStudentCount eachClassStudentCount =reportService.studentCountReport();
       return Result.success(eachClassStudentCount);
    }
}
